<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>brock</title>
    <style>
        .father {
            /*width: 80%;*/
            height: 1000px;
            background-color: pink;
            width:fit-content;
            margin:0 auto;
        }

        .son {
            width: 200px;
            height: 200px;
            margin: 0 auto;
            text-align: center;
            background-color: gray;
            float: left;
        }
    </style>
</head>
<body>
<div class="father">
    <div class="son">aaa</div>
</div>

</body>
</html>